/////////////////////////////////////////////////////////////////////////
//
// Amuse Engine SDK - resource
// Copyright( c) 2014.  All Rights Reserved
//
// File:		AEFilePathResolver.h
// Author:		Gianluca Belardelli
// Date:		26/05/2014
//
/////////////////////////////////////////////////////////////////////////
#ifndef _AEFILEPATHRESOLVER_H_
#define _AEFILEPATHRESOLVER_H_
/// \brief
///   Interface that can be globally installed to resolve file paths before loading a resource. See
///   VResourceManager::SetFilePathResolver
class AEFilePathResolver
{
// Methods
public:
	AE_DLLIMPEXP virtual ~AEFilePathResolver( void ) {;}
	
	/// \brief
	///   Virtual overridable to return a replacement file path for the incoming path (e.g. turn
	///   relative into absolute)
	/// 
	/// One global resolver can be installed by the static VResourceManager::SetFilePathResolver
	/// function to re-direct resource filenames.
	/// 
	/// \param szPath
	///   The incoming file path
	/// 
	/// \param szBuffer
	///   A Buffer that can be used to concatenate a custom path and then return it. This buffer has
	///   size FS_MAX_PATH thus enough for file paths
	/// 
	/// \return
	///   const char *szNewPath: The new replacement path. This can be the incoming szPath (default
	///   behavior), szBuffer or any other string that persists the call of this function
	AE_DLLIMPEXP virtual const char *ResolvePath( const char *lpPath, char *lpBuffer ) { return lpPath; }
};

#endif // _AEFILEPATHRESOLVER_H_
